package vista;

import java.awt.event.WindowListener;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTable;
import javax.swing.JScrollPane;

import javax.swing.WindowConstants;
import javax.swing.table.AbstractTableModel;
import panelVisual.JPanelGradiente;
import java.awt.event.ActionListener;
import java.awt.event.ItemListener;
import java.awt.event.WindowListener;

/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class VentanaListadoJugador extends JFrame{
	
	private JLabel lblTitulo;
	private JPanel pPrincipal;
	private JTable tblJugador;
	private JScrollPane scpJugador;	
	
		
		public VentanaListadoJugador() {
			super();
			initGUI();
		}
		
		public void initGUI(){
			try {
		    	 
//				JPanelGradiente panel= new JPanelGradiente();
//		     	panel.setLayout(null);
		     	 
//				setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
				
				getContentPane().setLayout(null);
				getContentPane().setBackground(new java.awt.Color(255,215,0));
				setTitle("TOP 5");
				{
					lblTitulo = new JLabel();
					getContentPane().add(lblTitulo);
					lblTitulo.setText("Los 5 Mejores por nivel");
					lblTitulo.setFont(new java.awt.Font("DejaVu Sans",1,16));
//					panel.add(lblTitulo);
					lblTitulo.setBounds(19, 19, 310, 32);
				}
				
				{
					pPrincipal = new JPanel();
					getContentPane().add(pPrincipal);
					pPrincipal.setBounds(31, 63, 410, 196);
					pPrincipal.setLayout(null);
					{
						scpJugador = new JScrollPane();
						pPrincipal.add(scpJugador);
						scpJugador.setBounds(0, 0, 410, 197);
						{
							tblJugador = new JTable();
							scpJugador.setViewportView(tblJugador);
						}
					}
					
				}
//				panel.add(pPrincipal);
				
//				add(panel);
				this.setSize(483, 359);
			    setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);    
				} catch (Exception e) {
					e.printStackTrace();
				}

		}
		

		public void setResultados(AbstractTableModel abstractTableModel) {
			tblJugador.setModel(abstractTableModel);
		}	
		
	     public void addListener(WindowListener escuchador){
	    	 addWindowListener(escuchador);
	     }
}